home *** CD-ROM | disk | FTP | other *** search
/ Sun Solutions 2000 #2 / Sun Solutions CD (Volume 2 2000)(Special Focus - Java Technologies)(Disc 1).ISO / products / Software / TornadoLabsLimited / book / KeyNavigateTest / CollisionChecker.java < prev    next >
Text File  |  2000-01-13  |  988b  |  41 lines

  1. /*
  2. //*****************************************************************************
  3. /*
  4. *    @(#) CollisionChecker.java
  5. *
  6. *    Project:        Java 3D Programming
  7. *    Client:        Manning Publications
  8. *
  9. *    Copyright (c) 1999 Daniel Selman 
  10. *    All Rights Reserved.
  11. *
  12. *    @author Daniel Selman: dselman@tornadolabs.com
  13. */
  14. //*****************************************************************************
  15.  
  16. import javax.media.j3d.*;
  17. import javax.vecmath.*;
  18.  
  19. import com.tornadolabs.dselman.j3d.book.*;
  20.  
  21. public class CollisionChecker
  22. {
  23.     CollisionDetector        m_Detector = null;
  24.     
  25.     Transform3D                m_ToWorld = null;
  26.     Transform3D                m_Transform3D = null;
  27.     Node                        m_Node = null;
  28.     boolean                    m_bViewSide = false;
  29.     
  30.     public CollisionChecker( Node node, CollisionDetector detector, boolean bViewSide )
  31.     {
  32.         m_Detector = detector;
  33.         m_Node = node;
  34.         m_bViewSide = bViewSide;
  35.     }
  36.     
  37.     public boolean isCollision( Transform3D t3d )
  38.     {
  39.         return m_Detector.isCollision( t3d, m_bViewSide );
  40.     }
  41. }